package org.dromara.business.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.business.domain.GoodsOrder;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.json.handler.DecimalRemoveZeroSerializer;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 订单视图对象 goods_order
 *
 * @author Lion Li
 * @date 2025-06-13
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = GoodsOrder.class)
public class GoodsOrderVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 订单编号
     */
    @ExcelProperty(value = "订单编号")
    private Long goodsOrderId;

    /**
     * 商品id
     */
    @ExcelProperty(value = "商品id")
    private Long goodsId;

    /**
     * 商品名称
     */
    @ExcelProperty(value = "商品名称")
    private String name;

    /**
     * 商品图片id
     */
    @ExcelProperty(value = "商品图片id")
    private String url;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "url")
    private String urlLink;

    /**
     * 商品价格
     */
    @ExcelProperty(value = "商品价格")
    private BigDecimal price;

    /**
     * 商品介绍
     */
    @ExcelProperty(value = "商品介绍")
    private String info;

    /**
     * 一级分类, 保存文字
     */
    @ExcelProperty(value = "一级分类, 保存文字")
    private String oneType;
    private Long oneTypeId;
    /**
     * 二级分类, 保存文字
     */
    @ExcelProperty(value = "二级分类, 保存文字")
    private String type;

    /**
     * 订单状态（1待付款 2待接单 3进行中 4服务完成(待客户确认) 5已完成 6已退款 ）
     */
    @ExcelProperty(value = "订单状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "order_status")
    private String status;

    /**
     * 联系手机号
     */
    @ExcelProperty(value = "联系手机号")
    private String phone;

    /**
     * 游戏ID
     */
    @ExcelProperty(value = "游戏ID")
    private String gameIdNo;

    /**
     * 游戏区服
     */
    @ExcelProperty(value = "游戏区服")
    private String gameAreaType;

    /**
     * 下单备注
     */
    @ExcelProperty(value = "下单备注")
    private String remark;

    /**
     * 打手id
     */
    @ExcelProperty(value = "打手id")
    private Long waiterId;

    /**
     * 打手昵称
     */
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "waiterId")
    private String waiterName;

    /**
     * 预估提成
     */
    @JsonSerialize(using = DecimalRemoveZeroSerializer.class)
    private BigDecimal fee;

    private Date createTime;

    private Long createBy;
    /**
     * 下单人
     */
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
    private String userName;
    /**
     * 下单人会员等级
     */
    private String userVip;
    private String createTimeStr;

    /**
     * 服务截图
     */
    private String serverImg;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "serverImg")
    private String serverImgUrl;
    /**
     * 服务完成截图备注
     */
    private String serverRemark;

    /**
     * 队友id(参与分佣)
     */
    private String memberIds;
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "memberIds")
    private String memberIdsName;

    /**
     * 购物车购买标识
     */
    private Long buyFlag;
}
